<template>
  <view class="v-nav" >
    <view class="nav-item" @click="goHome">
      <image class="icon-img" :src="homeImg" mode="widthFix"></image>
      <view class="nav-item-name" >
        首页
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
  
  },
  data() {
    return {
      homeImg: '/static/images/home-nav.png',
    };
  },
  methods: {
    goHome() {
      uni.switchTab({
        url: '/pages/index/index'
      })
    }
	}
  
};
</script>

<style lang="scss" scoped>
.v-nav {
 
  position: fixed;
  left: 20px;
  bottom: 120px;
  .nav-item{
    width: 60px;
    height: 60px;
    border-radius: 50%;
    @include flexAllCenter;
    flex-direction: column;
    
  
    background: rgba(0,0,0, 0.4);
    .nav-item-name{
      color: #fff;
      font-size: 16px;
    }
    .icon-img{
      width: 24px;
    }
  }
}
</style>